#pragma once
#include <nice2d/widgets/layout.h>

class StackLayout : public Layout
{
    DECLARE_OBJECT(StackLayout)
public:
    StackLayout();
    virtual ~StackLayout();
public:
    void addControl(ControlPointer widget,HMode hmode = HMode_Center,VMode vmode = VMode_Center);

    void setCurrent(int32_t index);
    void setCurrent(ControlPointer widget);
    std::weak_ptr<Control> getCurrent();
protected:
    virtual void adjust()override;
private:
    std::unique_ptr<class StackLayoutData> data;
};
